import h5py

def print_structure(name, obj):
    print(f'{name}: {type(obj)}')
    if hasattr(obj, 'shape'):
        print(f'  Shape: {obj.shape}')
    if hasattr(obj, 'dtype'):
        print(f'  Dtype: {obj.dtype}')

f = h5py.File('/home/algo/geyiheng/piper-data/bell/episode_0.hdf5', 'r')
print('Full structure:')
f.visititems(print_structure)
f.close() 